package com.dyit.controllor;


import com.dyit.dto.HttpResp;
import com.dyit.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
@RequestMapping("/api/category")
public class CategoryController {
    @Autowired
    private ICategoryService ics;
    @GetMapping("/findAll")
    public HttpResp findAll(){
        return new HttpResp(2001,"查询成功",ics.findAll(), LocalDateTime.now());
    }
}
